import React from 'react'
import { useSearchParams, useLocation } from 'react-router-dom'

function App() {
  // searchParams 传参
  // 取参方式1：
  const params = useLocation()
  console.log(params.search)

  // 取参方式2：
  const [params1] = useSearchParams()
  const data = Object.fromEntries(params1)
  console.log(data)

  return (
    <div>
      <div>About</div>
    </div>
  )
}

export default App
